﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using PathTracing;


[RequireComponent(typeof(Light))]
public class DirectionLightProxy : MonoBehaviour
{
    private Light CurrentLight
    {
        get
        {
            return GetComponent<Light>();
        }
    }

    private void Awake()
    {
        CurrentLight.type = LightType.Directional;
    }

    public DirectionLight GetDirectionLight()
    {
        DirectionLight light;
        light.LightColor = new Vector3(CurrentLight.color.r, CurrentLight.color.g, CurrentLight.color.b) * CurrentLight.intensity;
        light.LightDirection = CurrentLight.transform.forward;
        return light;
    }
}
